#!/bin/bash

if [ $# -ne 1 ]; then
	echo "Usage: $0 <IP address of the servers' RMI registry>"
	exit 1
fi


PT_DIR=$(dirname $0)
PT_BIN=${PT_DIR}/classes

#
# Enables remote management through JMX (useful for remote JConsole)
#
JMX_MGT="-Dcom.sun.management.jmxremote.port=56565 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

java -classpath ${PT_BIN} -Djava.rmi.server.codebase="file:${PT_BIN}/" ${JMX_MGT} -Djava.rmi.server.hostname=$1 edu.hda.server.RunPTServer $1

